import request from "@/utils/request"

//根据token获取用户信息
export function queryToken() {
    return request({
        url: `/userservice/user-info/getUserInfoByToken`,
        method: 'GET',
    })
}

//保存用户信息
export function saveUserInfo(from) {
    return request({
        url: `/userservice/user-info/saveOrUpdateUserInfoByToken`,
        method: 'POST',
        data: from
    })
}

//获取学院信息
export function collegeQueryAll() {
    return request({
        url: `/userservice/user-college/getAllCollegeAndMajor`,
        method: 'GET',
    })
}

//获取专业信息
export function querCollegeId(id) {
    return request({
        url: `/userservice/user-major/getMajorListByCollegeId/${id}`,
        method: 'POST',
    })
}
//根据id获取用户信息
export function queryById(id) {
    return request({
        url: `/userservice/user-info/getUserBaseInfoById/${id}`,
        method: 'GET',
    })
}
